package com.lw.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @author LW
 * @2020/10/1 11:18
 */
//等价于 <bean id="user" class="com.lw.pojo.User"/>
@Component //意思就是组件
@Scope("singleton")
public class User {
    @Value("www")//相当于bean内部的property给属性赋值
    public String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
